#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
 
int main()
{
   int fd = open("log.txt",O_RDWR);
   dup2(fd,0);
   char buffer[2048];
   size_t s = read(0,buffer,sizeof(buffer));
   if(s > 0)
   {
      buffer[s] = 0;
      printf("%s",buffer);
   }
    
 
    return 0;
}
